<!DOCTYPE html>
<html>
  <head>
    <meta http-equiv="content-type" content="text/html;charset=utf-8" />
    <link
      rel="stylesheet"
      type="text/css"
      href="{{pluResPath}}html/rank/rank.css"
    />
    <link rel="preload" href="{{resPath}}font/tttgbnumber.ttf" as="font" />
    <link rel="preload" href="{{pluResPath}}img/bg.jpeg" as="image" />
    <link rel="preload" href="{{pluResPath}}img/rank/top.png" as="image" />
    <link rel="shortcut icon" href="#" />
  </head>

  <body>
    <div class="container" id="container">
      <div class="head_box">
        {{if type=='rank'}}
        <h1 class="id_text">发电榜</h1>
        <h1 class="day_text">发电 - Top{{limitTop}}</h1>
        {{else}}
        <h1 class="id_text">最近发电</h1>
        <h1 class="day_text">最近发电 - Top{{limitTop}}</h1>
        {{/if}}
        <img class="genshin_logo" src="{{pluResPath}}img/rank/top.png" />
      </div>
      <div class="list">
        {{each rankData val idx}}
        <div class="item">
          <div class="image">
            <img
              class="icon"
              src="{{pluResPath}}img/rank/top{{idx < 3 ? idx : ''}}.png"
            />
          </div>
          <div class="avatar">
            <img class="icon" src="{{val.avatar}}" onerror="whenError(this)" />
          </div>
          <div class="title">{{val.name}}</div>
        </div>
        {{/each}}
      </div>
      <div class="logo">Created By TRSS-Yunzai & trss-xianxin-plugin</div>
    </div>
  </body>
  <script type="text/javascript">
    function whenError(a) {
      // a.onerror = null;
    }
  </script>
</html>
